﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 登录注册功能_sqlserver
{
    [Table("UserT")]
    public class UserTModelForEF
    {
        [Key]
        private int id;
        private string username;
        private string password;
        private string gender;
        private string nicheng;
        public int Id
        {
            get
            {
                return id;
            }

            set
            {
                id = value;
            }
        }

        public string Username
        {
            get
            {
                return username;
            }

            set
            {
                username = value;
            }
        }

        public string Password
        {
            get
            {
                return password;
            }

            set
            {
                password = value;
            }
        }

        public string Gender
        {
            get
            {
                return gender;
            }

            set
            {
                gender = value;
            }
        }

        public string Nicheng
        {
            get
            {
                return nicheng;
            }

            set
            {
                nicheng = value;
            }
        }
        [NotMapped]
        public string Realgender
        {
            get
            {
                return Gender == "1"? "男":"女";
            }

        }

        public UserTModelForEF()
        {
            
        }
        public UserTModelForEF(string username, string password, string gender, string nicheng)
        {
            this.username = username;
            this.password = password;
            this.gender = gender;
            this.nicheng = nicheng;
        }
    }
}
